package com.rambler.api.fileupload.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author suhao
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ImageProcessOption {
    // webp, jpg, png
    private String outputFormat;
    // 压缩质量
    private float quality;
    // 裁剪参数
    private CropRegion crop;
    // 缩放参数
    private ResizeOption resize;

    @Data
    @AllArgsConstructor
    public static class CropRegion {
        private int cropX;
        private int cropY;
        private int cropWidth;
        private int cropHeight;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class ResizeOption {
        private int maxWidth;
        private int maxHeight;
    }

}